﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/css/bootstrap.min.css"/>
		<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/jquery-2.2.4.min.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/jquery.tips.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/bootstrap.min.js" ></script>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>云众科技网上预约挂号系统</title>
	</head>
	<style type="text/css">
		html body{
			width: 100%;
		}
		.docInfo{
			border: 1px soli #2AABD2;
		}

	</style>
	<body>
		<!--
        	作者：石洪刚
        	时间：2017年8月10日14:12:50
        	描述：个人中心	联系我们	登录	注册
        -->
		<div class="container">
			<nav class="nav navbar-default navbar-fixed-top container-fluid" role="navigation" style="background-color:aquamarine;">
				<div class="nav navbar-header">
					<!-- 导航头 -->
					<a class="navbar-brand" href="#">云众科技</a>
					<button class="navbar-toggle" data-toggle= "collapse" data-target="#mynav">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
				</div>
				<div class="collapse navbar-collapse" id="mynav">
					<!-- 导航内容 -->
					<ul class="nav navbar-nav">
						<li><a href="">联系电话：0451-87362836</a></li>
						<!-- 下面的代码需要登录后才能显示 -->	
						<li><a href="<%=request.getContextPath()%>/personal/personal.jsp">个人中心</a></li>
						<li><a href="#"><span class="glyphicon glyphicon-user"></span>欢迎您：张飞</a></li>
					</ul>
					<!-- 导航尾，登录后不再显示 -->
					<div class="nav navbar-right">
						<ul class="nav navbar-nav">
							<li><a href="<%=request.getContextPath()%>/login.jsp">登录</a></li>
							<li><a href="<%=request.getContextPath()%>/register/register.jsp">注册</a></li>
						</ul>
					</div>	
				</div>
			</nav>
		</div>
		<!--
        	作者：石洪刚
        	时间：2017年8月10日14:32:38
        	描述：项目名称   搜索框 （搜索框只有游客或患者可见）
        -->
		<div class="container" style="margin-top: 50px;">
			<div class="col-sm-6" >
				<h2 class="text-primary" >云众科技网上预约挂号系统</h2>
			</div>
			
			<div class="col-sm-6" style="margin-top: 15px;">
				<form method="post" name="form1" class="form form-horizontal">
					<div class="input-group">
					     <div class="input-group-btn">
						    <button id="index_search_btn" type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">科室<span class="caret"></span></button>
						       <ul class="dropdown-menu" role="menu">
						         <li><a href="#">科室</a></li>
						         <li><a href="#">疾病</a></li>
						       </ul>
					     </div><!-- /btn-group -->
					     <input type="text" class="form-control" placeholder="请输入搜索内容" >
					     <span class="input-group-addon" style="background-color:#f0ad4e;cursor: pointer;" >
						   <span class="glyphicon glyphicon-search "></span>
					     </span>
					</div>
				 </form>
			</div>
			
		</div>
		<!--
        	作者：石洪刚
        	时间：2017年8月10日17:04:47
        	描述：导航条   游客可见(在dashboard页) ：按科室挂号  按疾病挂号  最新公告
        -->
		<div class="container" style="margin-top: 10px;">
			<ul class="nav nav-pills guahao" role="tablist" style="background-color:lightcyan">
			  	<li ><a href="/">首页</a></li>
			  	<li class="active"><a href="/depttype/query">按科室预约</a></li>
				<li ><a href="<%=request.getContextPath()%>/appointment/illness/listIllness.jsp">按疾病预约</a></li>
				<li ><a href="/listAnnouncement/query">最新公告</a></li>
			</ul>
		</div>
		<!--
        	作者：石洪刚 
        	时间：2017年8月20日21:51:22
        	描述：显示科室名称及科室内医生
        -->
        <form method="post">
	        <!-- 当前所在科室 -->
			<div class="container" style="margin-top: 20px;">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h4>
							<label>${dp.dpName}</label>
							<span>
								<a href="/depttype/query">选择其他科室</a>
							</span>
						</h4>
					</div>
				</div>
			</div>
			<!-- 医生信息 -->
			<div class="container docInfo">
	        	<table width="100%" class="table table-hover">
                    <c:forEach items="${pageInfo.list}" var="person" varStatus="i">
		        	<tr>
		        		<td width="15%">
                                <c:if test="${person.ppPic!=null }">
                                    <img src="/base/download?url=${person.ppPic}" width="150px" height="200px;"/>
                                </c:if>
                                <c:if test="${person.ppPic==null }">
                                    <img src="<%=request.getContextPath() %>/static/img/bianque.jpg" width="150px" height="200px;"/>
                                </c:if>
		        		</td>
		        		<td width="70%">
		        			<h4 class="list-group-item-heading">${person.ppName}<span style="color: #D58512;">${person.professionalName}</span></h4>
						    <h4 class="list-group-item-text">${person.departmentName}</h4>
						    <h4 class="list-group-item-text">出诊时间:${person.ppWork}</h4>
                            <h4 style="width:660px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" class="list-group-item-text">医生简介：${person.ppInfo}</h4>
						    <h4 style="width:660px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" class="list-group-item-text">擅长领域：${person.doctorDomain}</h4></div>
                            <h4 class="list-group-item-text">
						    	<a  onclick="datatime('${person.ppId}')">更多介绍...</a>
						    </h4>
		        		</td>
		        		<td width="20%" style="vertical-align: middle;">
		        			<button type="button" class="btn btn-primary" onclick="datatime('${person.ppId}')">现在预约</button>
		        		</td>
		        	</tr>
                    </c:forEach>
	        	</table>
	        </div>
	        <div align="center">
			<ul class="pagination">
                <yzpage:page pageName="pageInfo" url="/doctor/queryByKsId"></yzpage:page>
			</ul>
	        </div>
        </form>
	</body>
	<script type="text/javascript">
		//跳转预约页面
		function datatime(id,time,name){
            var date = new Date();  //取系统时间
            var year = date.getFullYear();  //取今年
			location.href = "<%=request.getContextPath()%>/doctor/queryDoctor?id="+id+"&year="+year;
		}

</script>
</html>